Imports Aricie.DNN.Modules.LuceneSearch.Business
Imports DotNetNuke.Common
Imports DotNetNuke.UI.Skins.Controls
Imports DotNetNuke.Entities.Modules
Imports DotNetNuke.Services.Localization
Imports DotNetNuke.UI.Utilities
Imports Aricie.DNN.Security.Trial
Imports Aricie.DNN.Configuration
Imports Aricie.DNN.Modules.LuceneSearch.Security
Imports Aricie.DNN.Modules.LuceneSearch.Configuration
Imports DotNetNuke.UI.Skins
Imports DotNetNuke.Services.Exceptions


Namespace Aricie.DNN.Modules.LuceneSearch.UI
    Partial Public Class ConfigurationInstall
        Inherits PortalModuleBase


#Region "Event handlers"

        Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load
            ConfigHelper.AssertIsInstalled(Me, New LuceneSearchConfigUpdate, Me.cmdInstall, Me.cmdUninstall)
            Dim tc As TrialController = TrialController.Instance(New TrialProvider())
            tc.LimitModule(Me, False)
        End Sub

        Private Sub cmdInstall_Click(ByVal sender As Object, ByVal e As EventArgs) Handles cmdInstall.Click
            Try
                ConfigHelper.ProcessModuleUpdate(ConfigActionType.Install, New LuceneSearchConfigUpdate)
                Response.Redirect(NavigateURL())
            Catch ex As Exception
                ProcessModuleLoadException(Me, ex)
            End Try


        End Sub

        Private Sub cmdUninstall_Click(ByVal sender As Object, ByVal e As EventArgs) Handles cmdUninstall.Click

            Try
                ConfigHelper.ProcessModuleUpdate(ConfigActionType.Uninstall, New LuceneSearchConfigUpdate)
                Response.Redirect(NavigateURL())
            Catch ex As Exception
                ProcessModuleLoadException(Me, ex)
            End Try


        End Sub


        Private Sub cmdRetour_Click(ByVal sender As Object, ByVal e As EventArgs) Handles cmdRetour.Click
            Response.Redirect(NavigateURL())
        End Sub

#End Region


    End Class
End Namespace
